package com.gxk.sound;

import java.util.HashMap;
import java.util.Map;

import com.gxk.res.SoundFactory;

public class VoiceHandle {

	private static Map<String, Integer> mapping = new HashMap<String, Integer>();

	static {
		mapping.put("fly", 0);
		mapping.put("go", 1);
		mapping.put("die", 2);
		mapping.put("hit", 3);
		mapping.put("point", 5);
	}

	public static void play(String string) {
		switch (mapping.get(string)) {
		case 0:
			SoundFactory.getSoundBirdWing().play();
			break;
		case 1:
			SoundFactory.getSoundBirdSwooshing().play();
			break;
		case 2:
			SoundFactory.getSoundBirdDie().play();
			break;
		case 3:
			SoundFactory.getSoundBirdHit().play();
			break;
		case 5:
			SoundFactory.getSoundBirdPoint().play();
			break;
		default:
			break;
		}
	}
}
